/*
 * @Description: 添加、编辑登记通用表单
 * @Author: Rfan
 * @Date: 2022-11-19 16:12:07
 * @LastEditTime: 2022-12-08 16:27:19
 */

import { Form, Input, Select } from 'antd';
import JPDatePicker from '@/components/JPComponents/JPDatePicker';
import { useConversionContext } from '../../../contexts/ConversionContext';
import type { IBaseDic } from '@/interfaces/global';

const ConversionForm = () => {
  const { typeList } = useConversionContext();

  return (
    <>
      <Form.Item name="registrationTime" label="登记时间">
        <JPDatePicker showTime />
      </Form.Item>
      <Form.Item name="unitName" label="单位名称">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="managementAuth" label="管理授权">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="responsibleDept" label="责任部门">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="type" label="管理类型">
        <Select
          options={typeList.map((item: IBaseDic) => ({ value: item.id, label: item.name }))}
        />
      </Form.Item>
      <Form.Item name="sourceFormat" label="源格式">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="targetFormat" label="目标格式">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="fileCount" label="文件转换数量">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="description" label="系统描述">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="completeDesc" label="完成情况">
        <Input allowClear />
      </Form.Item>
      <Form.Item name="startTime" label="操作开始时间">
        <JPDatePicker showTime />
      </Form.Item>
      <Form.Item name="endTime" label="操作结束时间">
        <JPDatePicker showTime />
      </Form.Item>
      <Form.Item name="registrant" label="操作人">
        <Input allowClear />
      </Form.Item>
      <Form.Item label="审核人">
        <Input allowClear disabled />
      </Form.Item>
    </>
  );
};

export default ConversionForm;
